unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,registry;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Edit3: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  reg : TRegistry;
begin
  try
  reg := TRegistry.Create;
  reg.RootKey := HKEY_LOCAL_MACHINE;
  
  reg.OpenKey('SOFTWARE\Classes\yoyo',true);
  reg.WriteExpandString('','yoyoProtocol');
  reg.WriteExpandString('URL Protocol','C:\Program Files\yoyo\yoyo.exe');
  reg.CloseKey;


  reg.OpenKey('SOFTWARE\Classes\yoyo\DefaultIcon',true);
  reg.WriteExpandString('','C:\Program Files\yoyo\yoyo.exe,0');
  reg.CloseKey;

  reg.OpenKey('SOFTWARE\Classes\yoyo\shell\open\command',true);
  reg.WriteExpandString('','"C:\Program Files\yoyo\yoyo.exe" "%1"');
  reg.CloseKey;

  finally
  reg.Free;
  end;
end;

end.
